<template>
    <div id="rich"></div>
  </template>
  
  <script setup>
  import { onMounted, onUnmounted } from "vue";
  import * as echarts from "echarts";
  let myRich = null;
  let myEchart = null;
  onMounted(() => {
    myRich = document.getElementById("rich");
    myEchart = echarts.init(myRich);
    let option = {
        xAxis: {
            type: 'category',
            data: ['Lily', 'Mary', 'mike', 'john']
        },
        yAxis: {
            min: 0,
            max: 100
        },
        series: [
            {
                type: 'pictorialBar',
                symbol: 'image://http://localhost:5173/image/first.svg',
                symbolSize: 20,
                symbolRepeat: true,
                data: [10,20,34,23]
            }
        ]
    };
    myEchart.setOption(option);
  });
  onUnmounted(() => {
    myEchart.dispose(myRich);
  });
  </script>
  
  <style lang="less" scoped>
  #rich {
    width: 800px;
    height: 400px;
  }
  </style>
  